Collision monitoring system

ABSTRACT

Disclosed is an improved system and method for sensing both hard and soft obstructions for a movable panel such as a sunroof. A dual detection scheme is employing that includes an optical sensing as the primary means and electronic sensing of motor current as a secondary means. The secondary means utilizes system empirical precharacterization, fast processing algorithms, motor parameter monitoring including both current sensing and sensorless electronic motor current commutation pulse sensing, and controller memory, to adaptively modify electronic obstacle detection thresholds in real time without the use of templates and cycle averaging techniques.

CROSS REFERENCE TO RELATED APPLICATIONS

The present application is a continuation-in-part of application Ser.No. 08/736,786 to Boisvert et al. which was filed on Oct. 25, 1996 nowU.S. Pat. No. 6,064,165, which was a continuation of U.S. applicationSer. No. 08/275,107 to Boisvert et al. which was filed on Jul. 14, 1994,now abandoned which is a continuation in part of application Ser. No.07/872,190 filed Apr. 22, 1992 to Washeleski et al., now U.S. Pat. No.5,334,876. These related applications are incorporated herein byreference. Applicants also incorporate by reference U.S. Pat. No.5,952,801 to Boisvert et al which issued Sep. 14, 1999. This applicationalso claims priority from U.S. Provisional application serial No.60/169,061 filed Dec. 6, 1999 which is also incorporated herein byreference.

FIELD OF THE INVENTION

The present invention concerns motor driven actuator control systems andmethods whereby empirically characterized actuation operation parametersare subsequently monitored, compared, and computed during real timeoperation to detect obstacles via adaptive obstacle detectionthreshold(s) for protection of people and/or equipment.

BACKGROUND

Prior art for automatically-powered actuator systems implementundesirable increased obstacle-sensing detection thresholds to avoidnuisance tripping caused by uncontrolled operation variables of static,transient, and periodic dynamic load conditions that individually and/orcollectively cause significant “normal” load variation. Thesesignificant ranges of system disturbance variables added to the nominalvariable ranges of operation characteristic of system parameters havenecessitated increased obstacle detection thresholds within which theautomatic actuation system is required to operate to avoid falseobstacle detection. Higher obstacle detection thresholds necessary toaccommodate all ranges of anticipated load variables inherentlydesensitize the system ability to detect initial onset of obstacledetection. Large obstacle detection thresholds also inherently increaseminimum system operational parameter disturbances for which obstacledetection is reliably possible without false tripping.

Examples of such relatively static but significantly ranging variableforces during closing an automobile sunroof panel include differentialair pressure caused by wind loading, air pressure caused by ventilationfan speed and/or window positions, gravity load varying from level touphill or downhill orientation, friction and/or lubricationcharacteristics varying with temperature and/or wear, and the like.

Examples of such relatively transient dynamic but significantly rangingvariable forces during closing an automatically controlled automobilesunroof panel include wind gust differential pressure caused by openingor closing another window, ambient wind shift, passing and being passedby another vehicle, and/or turning on vehicle ventilation; change ofvehicle uphill/downhill attitude; vehicle acceleration or deceleration;rough or poorly lubricated area on a actuator drive mechanism; frictionchanging with actuator drive motor speed; bumpy road; and the like.

Examples of such relatively periodic dynamic but significantly rangingvariable forces during closing an automatically controlled automobilesunroof panel include repetitive rough gear sector, faulty motorcommutation segment, buffeting pressure as caused by steady windturbulence, and the like. Fluid vortex shedding frequency isproportionate to flow velocity past a discontinuity.

Large-ranging system operation variables necessitate obstacle detectionthresholds that inherently necessitate greater operational parameterdisturbances by obstacles in order to detect obstruction withoutnuisance tripping. Larger normal operation disturbance variablesinherently require larger obstacle force and/or pinching prior toobstruction detection.

Prior art obstacle detection systems slowly adapt obstacle detectiontemplate thresholds over several previous operation cycles resulting ininferior real time response to monitoring actuator load-relatedparameters that can significantly vary from one actuation to the next.Such threshold detection limit algorithms are primarily based upon arunning average template of a fixed number of prior actuation operationswith fixed factors and/or terms and/or statistically determinedtolerance threshold of ongoing measurement parameters for obstacledetection. Therefore, prior art systems and methods incorporate inherentpractical limitations on true and reliable obstacle detectionperformance including minimum obstacle force sensitivity at detection,minimum detection time, minimum stopping time, and minimum obstacleforce at the stopped position.

To improve real time microcontroller algorithm performance of obstacledetection one prior art technique has been to control and/or regulatemotor drive speed to slower values to directly enable improvements inminimum obstacle force sensitivity at detection, minimum stopping time,and minimum obstacle force at the stopped position. These improvementsare at the tradeoff expense of slower actuator operation and increasedsystem RFI (radio frequency interference) and EMC (electromagneticcompatibility) issues.

National Highway Traffic Safety Administration (NHTSA) Standard 118contains regulations to assure safe operation of power-operated windowsand roof panels. It establishes requirements for power window controlsystems located on the vehicle exterior and for remote control devices.The purpose of the standard is to reduce the risk of personal injurythat could result if a limb catches between a closing power operatedwindow and its window frame. Standard 118 states that maximum allowableobstacle interference force during an automatic closure is less than 100Newton onto a solid cylinder having a diameter from 4 millimeters to 200millimeters.

Certain technical difficulties exist with operation of prior artautomatic power window controls. One difficulty is undesirable shutdownof the power window control for causes other than true obstacledetection. Detection of obstacles during startup energization, softobstacle detection, and hard obstacle detection each present technicalchallenges requiring multiple simultaneous obstacle detectiontechniques. Additionally, the gasket area of the window that seals toavoid water seepage into the vehicle presents a difficulty to the designof a power window control, since the window panel encounterssignificantly different resistance to movement in this region. Operationunder varying power supply voltage results in actuator speed variationsthat result in increased obstacle detection thresholds. Previous methodsand systems based upon running measurements and calculations from prioroperational parameters are inherently limited by their inability toadapt obstacle detection thresholds in real time.

SUMMARY OF THE INVENTION

This invention concerns an improved actuator system that provides fasteroperation, more sensitive obstacle detection, faster actuator stoppingwith reduced pinch force, and reduced false obstacle detection all withless costly hardware. This invention has utilization potential fordiverse automatic powered actuator applications including positioning ofdoors, windows, sliding panels, seats, control pedals, steering wheels,aerodynamic controls, hydrodynamic controls, and much more. Oneexemplary embodiment of primary emphasis for this disclosure concerns anautomatic powered actuator as a motor vehicle sunroof panel.

This preferred automotive sunroof system implements redundantnon-contact obstacle detection prior to physical contact force by thesunroof. The preferred system employed is an optical coupledtransmission-interruption sensing via opposing IR (infrared) emitter andIR detector elements across the pinch zone.

This controller system and method incorporate significant improvementsin “sensorless” electronic parameter sensing as more reliable means forhard and/or soft obstacle detection during initial energization, fulltravel, and/or end-of-travel.

Preferred means for position and speed sensing is via sensorlesselectronic motor current commutation pulse sensing of the drive motor.Motor current commutation pulse counting detection means and countingcorrection routines provide improved position and speed accuracy.

Improved adaptive methods and systems for obstacle detection thresholdsbased upon empirical operation performance algorithms and real timeoperation parameter monitoring replace typical operation templatemethods of prior art. Memory is eliminated as previously utilized forstoring a template or “signature” of pre-measured actuation cycleoperating parameter variables for subsequent operation cycle parametermeasurement and comparison therewith.

Algorithms and coefficients are empirically predetermined for automaticactuator operating parameters. Such algorithms compensate for variousoperational variables, including actuation speed as related to supplyvoltage, by virtue of intelligent software adaptation capability.

Only in certain limited cases is cycle calibration of an individualactuator characteristic required for operation after initial powerup andprior to enabling automatic operation. Such cycle calibration typicallyinvolves simply learning the number of incremental encoder pulses fromfull CLOSED to full OPEN positions as well as learning the presentposition via one of several known position sensing means. This caseenables one controller incorporating multiple software algorithmprograms to operate a family of sunroofs by simply learning whichsunroof is in the system.

Necessity for controlling and limiting motor drive speed by duty cycleenergization, PWM (Pulse Width Modulation), linear drive control, orother speed control means is eliminated due to improved real timealgorithms that adapt to full-ranging battery-powered actuation speedsand variable load conditions. Thus, actuation occurs at full speedpowered by full battery voltage.

Stored empirical parameter characterizations and algorithms adaptivelymodify obstacle detection thresholds during an ongoing actuation forimproved obstacle detection sensitivity and thresholds resulting inquicker obstacle detection with lower initial force, lower final pinchforce and reduced occurrences of false obstacle detection.

At least one internal and/or external FIFO memory and/or RAM (randomaccess memory) is utilized for storing running measured parameters of anongoing actuation.

At least one internal and/or external FIFO memory and/or RAM is utilizedfor storing running calculations based upon running measured parametersof an ongoing actuation.

Empirical characterization of actuator operation parameters andalgorithms, ongoing sensing measurements of motor operation parameters,FIFO memories, DSP (digital signal processing), adaptive algorithms forobstacle detection, and adaptive software filters collectively enableongoing adaptive modification of obstacle detection thresholds “on therun” in real time for improved obstacle detection sensitivity thresholdswith reduced occurrences of false obstacle detection.

Utilization of FIFO memory for actuation speed measurement, motorcurrent measurement, and calculations of an ongoing actuation with realtime adaptive algorithms enables real time running adaptive compensationof obstacle detection thresholds.

BRIEF DESCRIPTIONS OF THE DRAWINGS

FIG. 1 is a block diagram schematic of the components of an exemplaryembodiment of the present invention;

FIGS. 2A-2D are schematics of circuitry for controlling movement andsensing obstructions of a motor driven panel such as a motor vehiclesunroof;

FIG. 3A is a plan view depicting an optical sensing system formonitoring an obstruction in the pinch zone of a moving panel such as amotor vehicle sunroof;

FIG. 3B is a front elevation view of the FIG. 3A optical sensing system;

FIG. 3C is a plan view depicting an optical system with moving opticsfor monitoring an obstruction at the leading edge of a moving panel suchas a motor vehicle sunroof;

FIG. 3D is a front elevation view of the FIG. 3C optical sensing system;

FIG. 3E is a plan view depicting an optical sensing system with movingoptics, flexible optic fiber, remote IR emission, and remote IRdetection for monitoring an obstruction at the leading edge of a movingpanel such as a motor vehicle sunroof;

FIG. 4 represents typical startup energization characteristics of motorcurrent and per speed versus time;

FIG. 5 represents a simplified example characteristic steady statenominal motor operation function versus time or position showing nominalmotor operation function, upper and lower tolerance range, a typicalfixed prior art obstacle detection threshold, and inventive adaptivethreshold obstacle detection function (in this case, stable);

FIG. 6 represents a simplified example characteristic dynamic transientmotor operation function versus time and/or position showing motoroperation function with transients, a typical fixed prior art obstacledetection threshold, and inventive adaptive threshold obstacle detectionfunction showing transient response;

FIG. 7 represents a simplified example characteristic dynamic periodiccyclic motor operation function versus time and/or position showingmotor operation function with cyclic disturbances, a typical fixed priorart obstacle detection threshold, and inventive adaptive thresholdobstacle detection function showing cydical response; and

FIG. 8 is a sequence of measurements taken by a controller duringsuccessive time intervals and operation of a monitored panel drivemotor.

BEST MODE FOR PRACTICING THE INVENTION

FIG. 1 shows a functional block diagram of an actuator safety feedbackcontrol system 1 for monitoring and controlling movement of a motordriven panel such as a motor vehicle sunroof. A panel movementcontroller 2 includes a commercially available multipurposemicrocontroller IC (integrated circuit) with internal and/or externalFIFO memory and/or RAM (Random Access Memory) 2 a and ADC(analog-to-digital-converter) 2 b.

Eight-bit word bytes, eight-bit counters, and eight-bitanalog-to-digital conversions are used with the exemplary controller 2.It should be fully realized, however, that alternative word lengths maybe more appropriate for systems requiring different parameterresolution. Larger word bytes with equivalent ADC resolution enablesgreater resolution for motor current sensing. Likewise, larger wordbytes with higher microcontroller clock speeds enable greater resolutionfor motor per speed sensing plus quicker digital signal processing andalgorithm processing for quicker response time.

A temperature sensor 3 (which according to the preferred embodiment ofthe invention is an option) when installed, is driven by and sensed bythe controller 2. Temperature sensing allows the panel controller 2 toautomatically sense vehicle cabin temperature and open or close thesunroof to help maintain a desired range of temperatures. Temperaturecompensation of actuator obstacle detection thresholds is typicallyunnecessary.

An optional rain sensor 4 can be both driven by and sensed by themicrocontroller 2. Automatic closing of the sunroof panel occurs whenthe sensor is wet. Subsequently, the sunroof panel can be opened wheneither falling rain has stopped for some time duration or when the rainhas evaporated to some extent.

Manual switch inputs 5 are the means by which operator control of thesystem occurs.

Limit switch inputs 6 indicate to the control system such physicalinputs as HOME position, VENT/NOT OPEN Quadrant Switch, and end of panelmovement. Limit switch signals indicate where microcontroller encoderpulse counter registers are set or reset representative of specificpanel position(s).

Motor drive outputs 7 a and 7 b control whether the motor drives thepanel in the forward or the reverse direction. When neither the forwardnor the reverse direction are driven, the motor drive terminals areelectrically shorted together, possibly via a circuit node such asCOMMON, resulting in an electrical loading and thus a dynamic brakingeffect

Motor plugging drive, which is the application of reverse drive polaritywhile a motor is still rotating, is an optional method of more quicklystopping the motor, but has been unnecessary for use with the preferredembodiment of the sunroof panel controller due to satisfactoryperformance taught by this disclosure. Very large motor pluggingcurrents are often undesirable because they can easily exceed typicalmaximum stalled rotor currents producing undesired motor heating inlarge applications. Such high motor plugging currents can be detrimentalto the life and reliability of electromechanical relay contacts andsolid state switches used to switch motor operating currents. High motorplugging currents can also cause undesirable transients, trip breakers,and blow fuses in a power supply system.

Application of brakes and/or clutches is also unnecessary with theautomotive sunroof system due to the improved real time obstacledetection performance taught by this disclosure.

Optical Obstacle Detection

Obstacle detection by actual physical contact and/or pinch force withhuman subjects is somewhat unnerving to some individuals. For improvedsystem safety and user comfort, the preferred system utilizesnon-contact detection of obstacles in the path of the moving panel. Ofvarious technologies by which it is possible to sense an obstaclewithout physical contact, IR (infrared) emission with transmissioninterruption mode detection is preferred. IR emitting diodes and/or IRlaser diodes are the two preferred IR emission sources. IR photodiodesand/or IR phototransistors are the two preferred IR detection means.Optical obstacle detection senses and enables stopping of the actuatormovement prior to significant applied pinch force and possibly prior toactual physical contact with a subject. In unusual light conditions,explained below, optical sensing means becomes temporarily ineffective,thus obstacle detection via motor current sensing or current sensing andspeed sensing means becomes the remaining reliable backup method ofdetecting an obstacle.

Of two preferred configurations utilized for implementing IRtransmission interruption mode of obstacle detection, the first is useof at least one emitter and at least one detector sensing at leastacross the pinch zone in close proximity to an end of travel region of asunroof. As shown in FIGS. 3A and 3B, at least one IR emitter 100 and atleast one IR detector 102 are separated from each other by a sunroofpinch zone 104. In an exemplary embodiment of the invention, optosensing of obstructions is across and in relatively close proximity to apinch zone near the end of travel region of a sunroof. The depictions inFIGS. 3A and 3B do not show the entire region between emitter anddetector but it is appreciated that a gap G between emitter and detectoris on the order of the width of the moving sunroof. In this preferredembodiment, cabling 108 passes to the region of the detector 102 aroundthe end of the sunroof liner in the region of the end of the sunrooftravel. The detector and emitter are fixed to the sunroof liner and donot move. Implementation of this fixed configuration is simplified bylack of moving components, although the sunroof may have to push theobstacle into a sensing field between the emitter 100 and the detector102. Thus, although the sensing means is non-contact, the sunroof canstill contact the obstacle.

Of two preferred configurations utilized for implementing IRtransmission interruption obstacle detection, the second is use of atleast one emitter and at least one detector sensing at least immediatelyahead of the front moving edge of the moving portion of a sunroof. Asshown in FIGS. 3C and 3D, at least one IR emitter 100 and at least oneIR detector 102 are separated proximal a front moving edge of a sunroof103. In an exemplary embodiment of the invention, opto-sensing ofobstructions is across and in relatively close proximity to a front edge105 of the sunroof 103. The depictions in FIGS. 3C and 3D show theentire region between emitter and detector for which a gap G, betweenemitter and detector, is on the order of the width of the movingsunroof. In this preferred embodiment, flexible flat circuitry 107passes to the emitter 100 and the detector 102 of the moving panel orwindow to the region of the front moving edge. Alternate means to supplyelectrical signal and/or power to the moving opto-electronic componentsincludes means such as electrical contact brushes cooperating withconductive traces on the moving panel. Power and signal are optionallyboth transmitted over the same conductors. FIG. 3E shows an alternativemeans to supply IR emission to receive IR detection from the front edgeof the moving panel via flexible moving optic fiber 303 means connectedwith components 300, 302 that respectively emit IR and detect IRsignals. IR optical fibers are terminated at each end to opticalcomponents 304, 305 that perform collimating, reflecting, and focusingrequirements. The structure depicted in FIGS. 3A-3E make it possible tosense obstructions with no physical obstacle contact regardless of theposition of the moving sunroof.

Alternate, non-preferred means of obstacle detection include sensingback reflection from a reflective surface of radiation emitted from anemitter, electric field sensing of proximal material dielectricproperties, and magnetic field sensing of proximal material inductiveproperties.

Various techniques improve the operation and reliability of non-contactoptical detection sensing. In accordance with an exemplary embodiment ofthe present invention, the IR emitter 100 is driven with a duty cycleand frequency. One typical automobile sunroof application uses 20% dutycycle at 500 Hz IR emitter drive synchronized with IR detector sensing.Pulsed drive allows the IR emitter 100 to be driven harder during its ontime at a low average power. This harder drive yields improvedsignal-to-noise for IR sensing by the IR detector. The IR detectorcircuit synchronously compares the IR signal detected during IR emitteron times with IR emitter off times to determine ambient IR levels fordrive and signal compensation purposes. This allows the IR emitter to IRdetector optical coupling to be determined with a level of accuracy andreliability using closed loop feedback techniques.

Automatic gain feedback control techniques maintain the level of the IRemitter drive and/or the gain of the IR detector circuit so that opticalcoupling is above minimum desirable values. Such automatic gaincompensates, within certain limitations, factors including decrease inIR emitter output over accumulated time at temperature, IR emitteroutput temperature coefficient, dirt and haze fouling optic components,and high ambient IR levels.

Highly directional IR optical lenses and/or aligned polarized filters onboth the IR emitter and IR detector maintain better optical coupling andreduce the effects of ambient IR and reflected IR from other directions.Location of the IR detector in a physical recess further reduces thepossibility of extraneous IR “noise” from affecting the opticalcoupling.

Despite various means to reduce the possibility of excess extraneous IRfrom being detected, certain conditions occur that may allow very highlevels of direct and/or reflected sunlight to be “seen” by the detector.Sun IR power levels can saturate the detector output signal level sothat obstacle blockage of the pulsed IR emitter signals is not reliablysensed. Under such unusual “white out” circumstances, the IR opticalsystem is disabled by the panel controller 2 until the sunroof actuatoris nearly closed, at which position ambient IR noise is shielded by thesunroof. Thus, the complete emitter-detector IR coupling is made morereliable for the last movement of pinch point closure. Complete bodyblockage of the IR coupling path between the emitter and detector is nota “white out” condition, although if the body is blocking both ambientIR and emitted IR signal at the detector, a “black out” condition isinterpreted as an obstacle detection.

Although the IR obstacle detection means may be temporarily found to beunreliable by high ambient levels of IR, the disclosed sensing of hardand/or soft obstacles by motor current monitoring is always active as aredundant obstacle detection means.

Detailed Schematic

The controller schematic shown in FIGS. 2A-2D implements collisionsensing in one form by activating a light emitting diode 100 a whichemits at periodic intervals. In the event the infra red radiation is notsensed by a photo transistor detector 102 a, the controller 2 assumes anobstruction and deactivates the sunroof motor M. There is also aredundant and more reliable obstacle detection means for detectingobstacles based upon sensed motor operation parameters.

The preferred controller 2 is an Atmel 8 Bit microprocessor having 8Kilobytes of ROM and includes programming inputs 106 which can becoupled to an external data source and used to reprogram themicroprocessor controller 2. User controlled inputs 5 a, 5 b are coupledto user activated switches which are activated to control movement ofthe sunroof. The inputs are similar to now issued U.S. Pat. No.5,952,801 to Boisvert et al which describes the functionality of thoseinputs. Limit switch outputs 5 c, 5 d, 5 e are also monitored by thecontroller 2 and used to control activation of the sunroof drive motor.

The schematic depicts a clock oscillator 110 for providing a clocksignal of 6 MHZ for driving the microprocessor controller 2. To theupper left of the oscillator is a decoupling capacitor circuit 112 fordecoupling a VCC power signal to the microprocessor.

The circuitry to the upper right of the controller 2 provides powersignals in response to input of a high signal at the ignition input 114(FIG. 2B). When the ignition input goes high, this signal passes througha diode 116 to the base input 118 of a transistor 120 which turns on.When the transistor 120 turns on, a regulated output of 5 volts (VCC) isprovided by a voltage regulator 122 in the upper right hand corner ofFIG. 2B. A voltage input to the voltage regulator 122 is derived fromtwo battery inputs 124, 126 coupled through a filtering and reversepolarity protection circuit 130. Immediately above the positive batteryinput 124 is a relay output 131 which provides a signal one diode dropless than battery voltage VBAT which powers the relay coils 132, 134(FIG. 2D) for activating the motor.

The circuitry of FIGS. 2A-2D includes a number of operational amplifierswhich require higher voltage than the five volt VCC logic circuitrypower signal. At the extreme right hand side of the schematic of FIG. 2Bare two transistors 136, 138 one of which includes a base 140 coupled toan output 142 from the microprocessor controller 2. The secondtransistor has its collector coupled to the battery and an output on theemitter designated V-SW. When the microprocessor turns on the transistor138, the V-SW output goes to battery voltage. The V-SW output isconnected to a voltage regulator (not shown) which generates a DC signalthat supplied throughout the circuit for operation of the variousoperational amplifiers.

The microprocessor controller 2 also has two motor control outputs 150,152 which control two switching transistors 154, 156, which in turnenergize two relay coils 132, 134. The relay coils have contacts 162,164 coupled across the motor M for energizing the motor windings with abattery voltage VBAT. One or the other of the transistors must be turnedon in order to activate the motor. When one of the two transistors ison, the motor M rotates to provide output power at an output shaft formoving the sunroof or other panel along a path of travel in onedirection. To change the direction of the motor rotation, the firsttransistor is turned off and the second activated. The motor used todrive the sunroof panel back and forth along its path of travel in theexemplary embodiment of the present invention is a DC motor.

FIG. 2C depicts a circuit 180 for monitoring light emitting diodesignals. A light emitting diode 100 a has an anode connection 181coupled to the V-switched signal and the cathode is coupled through aswitching transistor 182 to a microprocessor output 183. Themicroprocessor outputs a 500 hertz signal at this output 183 having a20% duty cycle to the base input of the transistor. When the transistorturns on, the LED cathode is pulled low, causing the light emittingdiode 100 a to emit IR radiation. Under microprocessor control, thelight emitting diode produces a 500 hertz output which is sensed by aphoto detector 102 a. As the light emitting diode pulses on and off at500 hertz, the photo detector responds to this input. When current flowsin the photo detector, a voltage drop is produced across a voltagedivider 184 having an output coupled to an operational amplifier 186.When current flows in the photo detector in response to receipt of alight signal the voltage divider raises the voltage at the invertinginput 188 to the amplifier 186. The non-inverting input to thisamplifier is maintained at 2.5 volts by a regulated voltage divider 188.The operational amplifier 186 and a second operational amplifier 190define two inverting amplifiers which in combination produce an outputsignal of 500 hertz. With no signal appearing at the photo detector, anoutput 192 from the operational amplifier 190 is 2.5 volts. This signalis coupled to the microprocessor controller 2. In response to receipt ofthe photo detector signal, this signal oscillates and this oscillatingsignal in turn is sensed by the microprocessor.

The microprocessor controller 2 has two inputs 192, 194 that provideinput signals to a comparator internal to the microprocessor controller.As the state of the comparator changes, internal microprocessorinterrupts are generated which cause the microprocessor to executecertain functions. The first input 192 is derived from the output fromthe phototransistor 102 a. The second input 194 to the comparator is a3.3 volt signal generated by a voltage divider 195.

A motor current monitoring circuit is depicted in FIG. 2D and includes anumber of operational amplifiers 200-203 coupled to a current measuringresistor 210 in the lower right hand portion of the circuit diagram.This current measuring resistor is coupled to the operational amplifier200 configured as a differential amplifier through a second resistor211. An output 212 from this differential amplifier is a signalproportional to the current through the motor windings which has beenamplified by a factor of about four. The output from this amplifierpasses to a second gain of 3 amplifier 201 to an output 214 coupled tothe microprocessor controller through a resistor 215. This signal ismonitored by the microprocessor and converted by an A to D conversion toa digital value directed related to motor current.

An input 220 to the second pair of operational amplifiers 202, 203 iseither an output from the first differential amplifier 200 or the secondgain of 3 amplifier 201 depending upon whether a resistor 222 isinstalled in the circuit. One but not both of the resistors 222, 223 areinstalled in the circuit.

The changing signal output from the resistor is coupled to an invertinginput of an AC coupled amplifier and produces an output signal 226 tothe microprocessor controller 2 which changes with motor current andmore particularly as the commutator brushes pass over the motor armaturecommutation segments, the signal changes to form a sequence of pulses.The amplifier 203 is a level shifting amplifier which reduces the gainof the first amplifier depending upon sensed conditions. When the motorfirst is activated a huge current rush occurs due to the fact that themotor is stalled. This large current rush changes the output of the topamplifier thereby producing meaningful data even in a high currentsituation. As the current changes, the output of this top amplifiervaries to allow meaningful data to be supplied to the microprocessorregardless of absolute values of motor current.

The signal at the microprocessor is a analog signal having the ripplecomponent as the motor rotates. This signal is in turn interpreted bythe microprocessor controller 2 which generates values directly relatedto motor speed based upon the sensing and counting of these pulses.Additionally, the value changes in such a way that the slope can bemonitored so that the microprocessor can use digital signal processingtechniques on the input signal to determine a stalled motor conditionrepresenting an obstacle.

Measured Motor Parameters—DC Current Sensing

By monitoring the two inputs 216, 226, the microprocessor controller 2monitors the motor current from which the controller 2 determines bothsunroof incremental position and speed. Sensed motor current is alwayspositive regardless of motor drive polarity and rotation direction. Foreither condition of drive polarity the non-energized side of the motoris connected to COMMON through the low value current sensing resistor210 to produce a positive analog signal voltage directly proportionateto the motor current

This motor current signal is converted via hardware and/or software to afiltered signal and scaled by a fixed or optionally variable referencevoltage to produce a value less than a determined maximum value wherethe following definition applies: CUR={sensed motor currentanalog-to-digital-converted and scaled to engineering units}, where theanalog value for motor current is converted to eight-bit digitalresolution via an eight-bit ADC (analog-to-digital converter) within themicroprocessor controller 2. Eight bit resolution in the counter for CURyields an absolute count range of 0≦CUR≦255, where a maximum analogreference voltage is provided to the ADC to set the anticipated maximumpossible motor current limit value represented by a reference value 255.

A preferred means to increase sensed motor current resolution and thusimprove obstacle detection sensitivity is to adaptively adjust thereference voltage (set=value of 255 representative of full scale) and/orthe sensed motor current signal during times of relatively low currentoperation, returning to the highest scale during starting energization,end-stall detection, and as necessary for obstruction detection. Forthis eight-bit example, at least one bit of current measurementresolution can be gained during low current operation by decreasing thereference voltage by such means as a variable attenuation network and/orby scaling up the motor current signal by such means as a variable gainamplifier.

Analog motor current signal is lowpass filtered to remove noises frommotor current commutation and switching transients to produce a fastrunning average analog drive current signal to the microcontrollerrepresentative of motor torque load conditions. This voltage signal isconverted to a scaled digital value by the microprocessor. For example,normal steady operation of the motor at low battery voltage causes thecontroller to register a digital value of approximately 80 of full scale255, whereas startup energization at high battery voltage will result ina peak digital value of approximately 240 of full scale 255.

Measured Motor Parameters—AC Current Sensing

Typical DC brush motor current signals also have inherent waveform ACripples due to rotor current commutation. These motor current pulsesdirectly relate to incremental rotation of the motor shaft and sincegears and/or mechanical drive linkages link the shaft to the panel,directly relate to incremental change of position of the actuator. Therelationship of motor current commutation pulses to actuator incrementalmotion is not necessarily a linear correspondence.

Motor current analog signal can be AC coupled, bandpass filtered,amplified, and compared with a threshold to produce a digital signal viaan input representative of motor current commutation signals.Alternatively, motor current commutation signals can be directly sensedfrom the motor current signal via ADC and digital signal processingbandpass filtering having sufficient resolution to accurately measurethe relatively lower amplitude waveforms characteristic of motor currentcommutation pulses.

Various alternative and more expensive incremental encoder, absoluteencoder, and resolver means can produce similar signals representativeof incremental or absolute motor rotor position.

A parameter monitored by the controller, indicated by a variable, PP,has generic units of time per fixed increment of motor rotation or timeper distance which is defined as: PP={integer number of microcontrollerdock cycles per incremental motor encoder pulse period}, alternativelyreferred to as inverse speed or per speed. Eight-bit resolution in theinteger counter for PP yields an absolute range of 0≦PP≦255.

An input from a resistor network provides a reference voltage (in thedisclosed design about 2.5 volts) to an operational amplifier configuredas a comparator. Each time the motor current commutates a generatedspike is transmitted through a coupling capacitor to this comparator to“square up” the output waveform for input to the microprocessorcontroller. The microprocessor counts the number of microcontrollerclock pulses between adjacent motor current commutation pulse signals asan indication of pulse period (PP), which is inversely proportionate tomotor speed.

As an example, a relatively low count of 72 clock cycles per incrementalmotor encoder pulse period is representative of typical steady operationat maximum motor power supply voltage under light loading conditionswhereas the count of 240 clock cycles per encoder pulse period isrepresentative of typical transient startup energization acceleration atminimum motor power supply voltage under heavy loading conditions.

Position Accuracy

Motor current commutation pulses occur at generally regular intervalsover the travel path of the panel. One representative vehicle sunroofhas approximately 3000 commutation pulses over the full actuation rangeof the full open to the full CLOSED positions of the sunroof.

Back extrapolation of decreasing pulse periods upon startup indicatesthe typical loss of approximately one sensed pulse upon motorenergization due to the excessive time duration of the first pulse. Thislost pulse is either added or subtracted, depending upon direction ofenergization, to or from the actuator position counter register toincrease incremental position detection accuracy.

Weak and/or missing motor pole signals, due to a faulty coil and/orcommutator segment, are detected via software algorithms that callautomatic compensation algorithms to maintain a corrected positioncounter register value. Therefore, missed motor current commutationpulses ostensibly representative of motor deceleration magnitude beyondempirically-determined limits are pulse simulated for accuraterepresentation of motor speed and actuator position.

Extraneous pulses representative of motor acceleration beyondempirically-determined maximums are deleted from processing to maintainaccurate representation of motor speed and actuator position. Adaptingparameters for a DSP bandpass filter algorithm, based upon motor currentand speed, enable improved motor current commutation pulse-sensingsignal-to-noise ratios that result in improved accuracy for incrementalposition and speed sensing and ultimately in improved obstacle detectionaccuracy and sensitivity.

Minor corrections are made to a position counter register based uponempirical determinations of numbers of motor current commutation pulsesmissed due to inertial motion after motor de-energization. This numberof missed pulses is based upon the speed of the motor due primarily tothe monitored power supply voltage. To reduce errors in this inertialcorrection term, consistent motor speeds and thus consistent number ofmissed pulses are achieved at motor de-energization by energization ofthe motor for no less than a minimum time duration in response to even avery brief actuation of the manual motor energization switch.Furthermore, software debouncing of the manual switch contact deglitchesthe switch outputs at the microcontroller inputs by requiring the switchcontacts be sensed for some minimum time to be considered as a validcontrol input. Excepting abnormal circumstances such a power loss and/orobstruction detection, activation of the manual motor energizationswitch for more than the debounce time will result in motor energizationfor at least a minimum amount of time, thus providing sufficient time toachieve a relatively consistent speed and also a relatively consistentnumber of missed pulses after de-energization.

Position Sensing & Alternatives

By counting motor current commutation pulses as an incremental encoder,the microcontroller maintains a representation of actuator position byupcounting or downcounting a position count register based upon whetherthe motor is being energized in a clockwise or counterclockwisedirection. Limit switch inputs and/or end-of-travel stall currentindications indicate where the microcontroller position counter registeris either SET or RESET.

This method of position sensing is significantly simpler and less costlythan alternate well-known methods of sensing position using specializedsensors such as incremental encoders, absolute encoders, and resolvers.Improvements provided by adaptive DSP bandpass filters increase thesignal-to-noise and performance accuracy of this sensorless electronicposition encoding method and means to render it now technically viablefor this implementation.

Alternate position-sensing technologies include permanent magnet fields:Hall effect, magnetoresistive, magnetodiode, magnetotransistor, Wiegandeffect, and variable reluctance; capacitive; optical: Reflective andblocking; generated inductive magnetic fields: ECKO (eddy current killedoscillator), variable inductor, and variable transformer; and filmresistor.

No Template Calibration—Simple Position & Range Learning

True calibration, as with prior art, is unnecessary with the inventivesunroof controller due to the sufficiency of the improved empiricalcharacterization and algorithm routines incorporated within thesoftware. Upon powerup, the calibration and/or learning ofcharacteristic current and/or speed versus position as done with priorart sunroof and/or moving panel controllers is not performed with theinventive device of this disclosure. For some models of the sunroofcontroller, the only required learning is the absolute position of theactuator from a means of providing a true position input so that theincremental position counter can be either SET or RESET. This trueposition can be provided by such means as a limit switch, a Hall-effectswitch at a known actuator position, and/or by sensing motor stallconditions at the ends of travel. Resetting the absolute positioncounter, otherwise described as learning the absolute position isnecessary with models of the preferred embodiment utilizing the low costmeans of determining the actuator position by sensing motor commutationpulses for incremental position encoding. Alternatively, the use of amore expensive absolute encoder having no such incremental positioncounter and requiring no such resetting is a performance versus costengineering design tradeoff decision.

For certain cases the sunroof controller can be used with more than onetype of sunroof, therefore calibration is really a misnomer for whatamounts to determining which type of sunroof mechanism is beingcontrolled by learning the characteristic range of allowable motion ofthe cooperating mechanism, as well as the actuator position. Thecalibration step need only be performed the first time power is appliedto the circuit, or if the physical characteristics of the sunroofchange. Until calibration is performed, a automatic operation expressmode movement feature is inhibited.

Recalibration can be initiated at any time the user feels that thecontrol circuit is not performing as it should and must always be doneif either the controller 2 or the sunroof is changed. The size of theroof is recorded in the EEPROM as well as an identification word flag toenable sunroof operation in the express mode. The position of thesunroof is recorded in the EEPROM each time the sunroof is stopped frommoving. This is done to guarantee that in the case of a power downsituation, the current position of the sunroof is always known. If atany time the position is considered to be unknown, the express mode isdisabled until the next time the sunroof is moved to the fully CLOSED orhome position.

The calibration learning of the movement range and position of thesunroof are learned and recorded as follows. The ignition is turned OFFand within five seconds the OPEN switch is pressed and the ignition isswitched ON. The controller 2 attempts to find the HOME or PARK positionthen proceeds to find the limit of the open area or the sunroof, i.e.the fully open position. When a stall condition is sensed the size ofthe sunroof open area (by count of motor encoder pulses) is recorded andthe controller reverses the direction toward the PARK position. Thecontroller then finds the limit of the vent area by driving the sunrooftoward the full VENT position until a stall condition is sensed. A stallcondition is determined when analog-to-digital converted motor currentis equal to or greater to 180 on the unitless current scale ranging from0 to 255. If it is not possible to perform the calibration due to afailure to find the park position, no information is recorded and thesunroof express mode (automatic operation) is disabled.

Soft Stop

High position sensing resolution and accuracy enable the actuationsystem to anticipate the mechanical limit and thus deenergize the motordrive just prior to the actuator hitting its hard stop limit. This saveswear and tear on the mechanism as well as aids in maintaining high motorcommutation pulse sensing accuracy. Mechanical “windup” of actuatordrive components is significantly reduced by deenergizing and thusstopping the actuator before the torque becomes unnecessarily excessive.Reduction of mechanical windup further improves the consistency of themotor current commutation pulse train of a subsequent motorenergization, thus enabling both improved capability of obstacledetection at startup and quicker obstacle detection thresholdadaptation. Utilization of motor current commutation pulse sensing as anincremental encoder is enhanced in both speed and position accuracy byreduction of pulse sensing errors associated with windup relaxation anderratic motor pulse train upon startup.

Soft stop also limits high values of end-of-travel motor current, thusenabling improved current sensing resolution by use of a lower ADC motorcurrent reference value that is significantly closer to normal operatingvalue than to higher stall value. High position sensing accuracy enablesimproved position-related determination of critical and fast-changingobstacle detection thresholds. High position sensing accuracy alsoenables accurate anticipation of increased motor loading due to theelastomeric environmental seal near the closing of the panel, thusobstacle detection thresholds are appropriately increased as a functionof position.

Digital Signal Processing

Motor current is sensed by preferred DSP techniques that provide lowpasssoftware filtering of the motor current signal to filter out electricalnoises, especially the undesirable frequency ranges characteristic ofcommutation pulses, switching transients, pulse drive transients, anddrive transients.

Motor current commutation pulses are sensed by preferred DSP techniquesthat provide bandpass software filtering of the motor current signal tohighpass filter out the DC motor current signal and to lowpass filterout electrical noises and especially the undesirable frequency rangescharacteristic of pulse width drive transients, when applicable.

Additionally, adaptive DSP algorithms modify the obstacle detectionthresholds in real time response to actual monitored motor operationparameters. A static shift in motor current and/or speed will result ina related shift in obstacle detection threshold. A transient dynamicmotor current and/or speed will result in a related shift in obstacledetection threshold. Sensed periodic cyclical dynamic motor currentand/or speed will result in a related periodic cyclical obstacledetection threshold.

Advantages of DSP versus hardware implementation as described aboveinclude smaller circuit size, fewer components, lower cost, lower mass,and especially ability to adapt filter algorithms for pulse detectionthresholds during operation to improve performance characteristics.

Variable Load Parameters—Adaptive Obstacle Detection Threshold

With the sunroof panel automatic powered actuator system, normal vehicleinside-to-outside relative pressure differences and/or wind buffetingcan cause respective static, periodic dynamic, and/or transient dynamicvariations in the effective actuator motor loading and thus in the motorcurrent that is compensated for by algorithms for adaptive obstacledetection thresholds. Increasing vehicle wind speed and/or operation offorced vehicle ventilation can produce static pressure differences thatincrease the load on the sunroof panel motor during operation.Increasing vehicle wind speed and/or external conditions can producecyclical wind buffeting conditions that correspondingly cyclicallyalters the motor loading. Amplitude and frequency of cyclical buffetingas fluid vortices is a function of relative fluid velocity. In certaincircumstances, there is a relationship between cyclical wind buffetingand static differential air pressure. Obstacle detection thresholds areactively modified with increasing vehicle air speed and with increasingwind buffeting to reduce false obstacle detection. It is anticipatedthat information about the vehicle speed and/or direction can providevalue to the sunroof application by correlation with characteristicloading of the vehicle sunroof and/or window operation.

Unique software algorithms enable characteristic determination of realtime actuator operation load categorized as startup transient, nominal,static variable, periodic dynamic variable, transient dynamic, softobstacle, and hard obstacle. Nominal load is the characteristic motorcurrent and speed as empirically pre-characterized for the actuator.Static variable represents a steady factor of the nominal load by whichthe ongoing nominal actuation is correspondingly factored up or down.Transient dynamic load represents temporary load magnitude excursionterms by which the ongoing nominal actuation parameter is altered.Periodic dynamic is a cyclical load term by which the ongoing nominalactuation is cyclically loaded with a regular period and amplitude.

FIGS. 5-7 show simplified examples of how DSP is applied in real time toalter and reduce obstacle detection function thresholds for increasedobstacle detection sensitivity tolerances. The inventive obstacledetection function threshold adaptively responds via superposition ofindividual responses to various simultaneous types of load disturbancevariables herein described.

FIG. 5 shows an example of a simplified case of a typical obstacledetection threshold based on template technology versus the adaptiveobstacle detection function threshold of the present invention. Therelatively large and fixed obstacle detection threshold of prior artaccommodates the three types of system load variables described above.The present invention maintains a comparatively lower threshold valueand their higher sensitivity than the prior art by virtue of its abilityto adapt to various types of system load variables.

FIG. 6 shows an example of a simplified case of the inventive DSPadapting the obstacle detection function threshold in real time toaccommodate dynamic load shifts. Note that the adaptive threshold tracksthe motor operation function with intentional adaptive response delaytime and slew rate. The degenerate case of a static load shift is notshown, although somewhat similar to FIG. 6. The present inventionmaintains a comparatively lower threshold value and their highersensitivity than the prior art by virtue of its ability to adapt tovarious types of system load variables.

FIG. 7 shows an example of a simplified case of inventive DSP adaptingthe obstacle detection function threshold in real time to accommodateperiodic cyclic dynamic load variations. Initially, before periodicityis ascertained, the adaptive response delay time of FIG. 6 prevails.Upon a determination that the disturbance is strictly periodic, as witha bad gear tooth, after perhaps three cycles, the adaptive responsedelay time delay time is reduced to more accurately track the knownperiodicity of the cyclic disturbance. The present invention maintains acomparatively lower threshold value and thus higher sensitivity than theprior art by virtue of its ability to adapt to various types of systemload variables. Note that after cyclical periodicity of the disturbanceis established, the normally lagging response of the adaptive thresholdobstacle detection function becomes predictive so the periodicity of thedynamic response of the adaptive threshold obstacle detection functionbecomes in phase with the related dynamic disturbance of the motoroperation function. Thus, the adaptive threshold more closely tracksactual motor operation function than does prior art. The net result isobstacle detection with greater sensitivity to real obstacles withreduced occurrences of false obstacle detection.

The engineered characteristic response time, slew rate, and frequencyresponse of the real time adaptive obstacle detection thresholdalgorithm must respond in a manner significantly less than 180 degreesout of phase with anticipated cyclical load variables, yet not so fastas to interfere with either hard and/or soft obstacle detectionalgorithms. These adaptive threshold response constraints effectivelylimit how fast the real time adaptive obstacle detection functionthreshold is allowed to change in response to changes in load variablethat are ascertained to be not caused by hard or soft obstacleinterference. It is important to see that the real time adaptiveobstacle detection function threshold is equal or lower than the fixedobstacle detection threshold of prior art template methods. Lowerobstacle detection function thresholds produce more sensitive obstacledetection, faster obstacle detection, faster actuator deenergization,faster actuator stopping, and lower peak obstacle force at finalstopping position.

Reduced Actuation Speed

Circuitry disclosed in U.S. Pat. No. 5,334,876 uses a PWM (pulse widthmodulated) activation of the motor windings of a direct current motor tocontrol and/or regulate the speed of motor output shaft rotation as themotor opens or closes the window or panel. The present system preferablyapplies full battery voltage of a motor vehicle across the motor todrive actuator panel motion. As the motor controller industry learns tomeet obstacle detection anti-pinch force regulations, it is fullyanticipated that allowable forces might be lowered, possibly resultingin the necessity to use motor drive speed-reducing techniques to enablefull regulatory compliance.

Typical applications of drive power to a motor include full power supplyvoltage, fixed duty cycle pulse drive, PWM (pulse width modulation) toregulate average motor speed and/or acceleration, pulse repetitionmodulation to regulate average motor speed and/or acceleration, lineardrive of a fixed fraction of the full power supply voltage, linear driveof a fixed voltage, controlled linear drive to regulate average motorspeed and/or acceleration, and phase angle switching control for ACmotor applications. Switching transients are reduced and RFI/EMC isimproved for any of the above switchmode methods of motor drive byfiltering the drive output and/or controlling the slew rate of turn onand/or turn off of the motor drive power.

Relays and power contactors are typically utilized for relatively slowpower control applications such as for switching on/off and forswitching energization between forward and reverse. Solid state switchesare typically utilized for relatively fast power control switchingapplications. Solid state linear drive components typically requiresignificant heat sinks to dissipate the waste heat, although therelatively smooth output drive voltages are best for motor drive and lowRFI EMC issues. Furthermore, AC motor applications typically use triacsor SCRs (silicon controlled rectifiers) for phase switching control ofmotor power.

Generic Obstacle Detection

To detect an obstruction when the sunroof panel is closing in itsautomatic operation mode, in brief, the microprocessor measures themotor current and speed for the ongoing actuation and compares againstan empirically-determined algorithm within the controller for motorcurrent and speed versus position and/or time. When calculations basedupon sensed current, pulse period, derivatives thereof, and actuatorposition cause a calculated threshold to be exceeded, an obstruction isascertained and the sunroof is brought back to its full OPEN or fullVENT position.

A trippoint calculation utilizes memory buffers to store motor operationparameter information needed to make a determination about obstructiondetection. If the sunroof is calibrated and is subsequently placed inthe automatic close mode, the controller 2 uses the contents of thesebuffers to determine the presence of an obstruction. Variations ofnumerical term and factor values of the obstacle detection thresholdalgorithm of cited references, commonly owned, are fully anticipated perempirical characterization of any particular actuation system. Such termand factor values can be predetermined and/or adaptive via DSPalgorithms. It is impractical to even attempt to show all apparentvariations.

Trip point algorithms are based upon empirically obtained measurementsfrom actuations over chosen ranges of operating conditions.

The pulse period relates to sunroof speed. As the speed increases,factors that utilize pulse period (PP) cause obstruction indication moreeasily than at low speed. Stated another way, the threshold is made tobe close to the operating current since there is a shorter time to reactto the occurrence of an obstruction.

Other terms relate to motor current. Another term avoids obstructionsensing for a sharp current increase due to spurious and short livedcurrents that might otherwise cause false obstruction detection. Nominalvalues for I (motor current) are from 40 to 80. These do not correspondto units of amperes or milliamperes, but are instead scaled engineeringunits based upon the motor and circuitry used to sense the motorcurrent.

Startup Obstruction Detection Summary

FIG. 4 shows typical startup energization characteristics of current andper speed for a motor. Startup obstacle detection is somewhat difficultbecause the characteristic startup current for a motor typically beginswith a quick inductive rise toward a peak value primarily limited by theresistive impedance of the motor coil and speed starts from zero.Startup current peaks typically approach stalled rotor current ofapproximately four and one half to six times normal operating current.Starting currents peak quickly, approaching a typical maximum value ofapproximately 75% of stalled rotor condition, after which motor currentgradually reduces to a steady state operating condition primarily due toincreasing back EMF (electromotive force) generated by gradualincreasing rotation speed of the rotor. Higher reference values forcurrent sense scaling can be preferred for startup and stall conditionsversus normal steady operation.

Relatively fast clock speeds of microcontroller circuitry enable fastdetection of hard obstacles at startup by monitoring parameters of motorcurrent and motor PP. Algorithms based upon monitored parameter valuesof motor voltage and motor current load, during a fixed startup timeinterval enable predicted anticipation of motor speed. If the sensedspeed at the end of the fixed startup time interval is below adetermined threshold, then an obstacle is determined. If the sensedcurrent at the end of the fixed startup time interval is above adetermined threshold, then an obstacle is determined.

Expressed in other terminology, after allowing some small initial amountof time for the motor rotor to begin rotation, I is immediately measuredand compared against a fixed maximum threshold value and PP isimmediately measured and compared against some maximum threshold numberof clock cycles. If either measured parameter variable exceeds its fixedthreshold value, then a hard obstacle detection is made and motor driveis immediately discontinued, and the actuation is briefly reversed torelease the obstruction. The initial amount of time is that time duringwhich a significant increase in motor speed is expected to bemeasurable. A larger motor and a motor with greater associatedrotational inertia from the load will both typically require a longeracceleration time.

Hard Obstacle Detection Summary

In brief, hard obstacle detection is generally based upon adaptivealgorithms that evaluate an immediate short history of motor current andspeed of the immediate actuation. Hard obstacle detection is via fastprocessing algorithms of at least one FIFO memory containing sequentialmeasurements of motor electrical current and per speed. Runningcalculations based upon the FIFO memory of measured values are stored inat least one FIFO memory. Hard obstacle detection after startup isperformed via two algorithms. One algorithm method is based upon speedand rates of change of speed (also known as acceleration anddeceleration) and/or rates of change of acceleration or deceleration(also known as jerk) to determine at least one value in excess of atleast one limit. Another algorithm method is based upon measurements ofmotor current and derivatives thereof based upon time and/or position attimes and/or positions determined at each motor commutation pulse andwith further calculations based thereupon to determine at least onevalue in excess of at least one limit.

Hard obstacle threshold detection limits based upon motor current arealso modified based upon the number of microcontroller pulses countedper motor current commutation pulse period. The condition of exceedingeither one of these adaptive threshold limits is construed as hardobstacle detection. Implementation of this method is by utilization ofat least one FIFO memory for storing such running measured values as PPand/or I, as previously defined. Additional FIFO memory can be used tostore additional running calculated values based on PP and/or I. Theserunning calculated values based upon time and/or position are of typesincluding first derivative, second derivative, higher orderderivative(s), weighted running averages, algebraic expressions,logarithms, statistical functions, and the like for computation ofadaptive thresholds based thereupon.

Fast real time digital processing routines are simplified algebraicequations derived from piecewise linearization and/or other simplifiedalgorithms for curve fitting of empirical sunroof panel operationaldata. Depending on accuracy requirements and relative algorithmprocessing speeds, higher order curve-fitting routines are anticipated.Hard obstacle detection occurs when either I and/or PP exceed a runningadaptive threshold value comprised of terms based upon fixed, static,and/or dynamic values.

Soft Obstacle Detection Summary

In brief, soft obstacle detection is generally based upon adaptivealgorithms that evaluate an immediate history of motor current and speedof the immediate actuation. The immediate history is much longer thanthat immediate short history per hard obstacle detection algorithms.Soft obstacle detection is also via fast processing algorithms of atleast one FIFO memory containing sequential measurements of motorelectrical current and per speed. Running calculations based upon theFIFO memory of measured values are stored in at least one FIFO memory.Soft obstacle detection after startup is performed via two algorithms.One algorithm method is based upon speed and rates of change of speed(deceleration) to determine at least one value in excess of at least onelimit. Another algorithm method is based upon measurements of motorcurrent and derivatives thereof based upon time and/or position at timesand/or positions determined at each motor commutation pulse and withfurther calculations based thereupon to determine at least one value inexcess of at least one limit.

Implementation of this unique method is by utilization of at least oneFIFO memory for storing such running measured values as PP and/or I.Additional FIFO memory can be used to store additional runningcalculated values based on PP and/or I. These running calculated valuesbased upon time and/or position are of types including first derivative,second derivative, higher order derivative(s), weighted runningaverages, algebraic expressions, logarithms, statistical functions, andthe like for computation of adaptive thresholds based thereupon. Fastreal time digital processing routines are simplified algebraic equationsderived from piecewise linearization and/or other simplified algorithmsfor curve fitting of empirical sunroof panel operational data. Dependingon accuracy requirements and relative algorithm processing speeds,higher order curve-fitting routines are anticipated. Soft obstacledetection occurs when either I and/or PP exceed a running adaptivethreshold value comprised of terms based upon fixed, static, and/ordynamic values.

Software Digital Signal Processing Techniques

Algorithm methods generally used for data analysis can include timedomain and/or frequency domain techniques. These data processingtechniques include, but are not restricted to, algebraic manipulation,logical comparison, convolution, convolution integral, Fouriertransforms, fast Fourier transforms, discrete Fourier transforms,z-transforms, wavelet analysis, and the like. Digital signal processingtechniques and algorithms are used to monitor data from motor operationparameters and/or derived data thereof in practical real time toascertain motor operation parameter changes characteristic of undesiredobstacle loading.

Collision detection notation

Measured readings of hardware-filtered I_(n) (motor current) and PP_(n)(pulse period) are triggered by and thus synchronized with motor currentcommutation pulse detections. Multiple FIFOs (first-in-first-outmemories) are utilized to store running measurements of I_(n) and PP_(n)as well as calculated values derived therefrom. In a very general sense,both hard obstruction detection and soft obstruction detectionalgorithms are based upon weighted factors of the history of runningmeasurements and running calculations. Hard obstacle detection is biasedmore toward a relatively recent-term history, whereas soft obstacledetection is weighted more toward a relatively longer-term history.

Generalized obstacle detection is considered as an abbreviated subsetfrom a very broad set of weighted factors based upon a running historyof measured motor operation parameters and data calculations basedthereupon for the immediate actuation operation. Prior methods ofobstacle detection implement the method of predetermining an operationparameter template based upon some number of running weighted averagesof sequential prior actuations. The present method uses no suchpredetermined operation parameter template, but rather calculates bothhard and soft obstacle detection thresholds during the immediateactuator operation based upon at least one software algorithm.

Motor speed fractionally varies significantly more than does motorcurrent with magnitude of motor supply voltage. Motor torque loadcorrelates very well with motor current. Thus, motor current is theprimary measured parameter of immediate importance for both hard andsoft obstacle detection. Obstacle detection is desensitized toelectronic noise by implementing a running software filter to calculatenoise-reduced motor current for determination of obstacle detection.Obstacle detection is based upon measurements of motor current and motorspeed per the following notations.

Processing equations, data, and variables utilize the followingnotations and definitions.

Subscript n represents pulse number, n≧0, where

n=0 ≡ most recent motor current commutation pulse

n=1 ≡ motor current commutation pulse just prior to n=0

n=2 ≡ motor current commutation pulse just prior to n=1.

Subscript m represents the identifier for motor operation term weightingfactors, m≧0, where

Km≡empirically determined term-weighting factors, alternativelyadaptive.

Measured motor operation parameters, FIFO registers, where

I_(n)≡ measured motor current at the n^(th) commutation pulse

PPn≡counted number of clock cycles per pulse period between motorcurrent commutation pulses from pulse n to (n+1).

Calculated motor operation values, FIFO registers, where

I_(R0)≡ calculated running software-filtered value of prior sequentialmeasured motor currents in range zero

I_(R1)≡calculated running software-filtered value of prior sequentialmeasured motor currents in range one

I_(Ra-p)≡calculated running software-filtered value of prior sequentialmeasured motor currents in ranges a-f (a through f ) . . .

{Min I_(Ra-f)}≡determined value of a minimum of motor current readingsin prior sequential ranges a-f

{Max I_(Ra-f)}≡determined value of a maximum of motor current readingsin prior sequential ranges a-f

PP_(R0)≡calculated running software-filtered value of prior sequentialcounted PP in range zero

PP_(R1)≡calculated running software-filtered value of prior sequentialcounted PP in range one

PP_(Ra-f)≡calculated running software-filtered value of prior sequentialcounted PP in ranges a-f

Very recent motor operation parameter history is represented by at leastone data set range given numeric identifier. Range zero includes datasets represented by the most recent sequential few motor currentcommutation pulses, typically 4 to 8 pulses. Range one includes datasets represented by a similar number of 4 to 8 motor current commutationpulses immediately prior to range zero. Although ranges zero and onetypically represent data sets for 4 to 8 motor current commutationpulses each, the quantity of represented data sets can be as low as 1and higher than 16, as determined by system operation requirements andmonitored dynamic system conditions. Furthermore, the quantity ofrepresented pulses per data set can be interactively modified inresponse to variations of measured motor operation parameters. Thenumber of data sets in ranges one and two are empirically determinedsomewhat by the extent of software filtering necessary to adequatelyrepresent very recent history of motor operation parameters.

The quantity of such numeric identifier data ranges can be as low as 1and higher than 8, depending upon actuator system dynamic response andfast filtration algorithm requirements. Furthermore, the quantity ofdata sets can be interactively modified in response to variations ofmeasured motor operation parameters. Fast filtration requirements aredetermined by the electrical noise level, the number of motor currentcommutation pulses per motor revolution, the numbers of gear teeth indrive mechanisms, mechanical vibrations, and the like.

Longer recent motor operation parameter history is represented by atleast one range given alphabetic identity. Range a, b, c, d, e, and fincludes six data sets each represented by a significantly larger dataset range than numeric identifier ranges zero and one. Although sixranges are here described, this quantity can be as low as one and higherthan six, as determined by system operation requirements and monitoreddynamic system conditions. Typically, each of the ranges a-f includes 8to 24 data sets. Range a represents the most recent sequential motorcurrent commutation pulses. Range b represents the similar-sized rangeimmediately preceding range a. Likewise, up to range f. The number ofdata sets in ranges a-f can be as low as one and significantly higherthan 24, depending upon slow filtration algorithm requirements.Furthermore, the number of data sets in each of ranges a-f, as well asthe quantity of ranges, can be interactively modified in response tovariations of measured motor operation parameters. Fast filtrationrequirements are determined by the electrical noise level, the number ofmotor current commutation pulses per motor revolution, the numbers ofgear teeth in drive mechanisms, mechanical vibrations, frequency ofperiodic load disturbances, and the like.

Following examples will describe the use of two numeric identifier dataset ranges zero and one, for very recent motor operation data, with eachrange representing data sets for six motor current commutation pulses.Following examples will also describe the use of six alphabeticidentifier data set ranges a-f, for longer recent motor operation data,with each range representing data sets for 15 motor current commutationpulses.

In a simple preferred case, calculated running software-filteredalgorithms determine even-weighted boxcar averages of sequential datafrom defined FIFO ranges, as follows.

For defined range zero,$I_{R0} \equiv {\sum\limits_{n = 0}^{n = {x - 1}}{A_{n}I_{n}}}$ and${PP}_{R0} \equiv {\sum\limits_{n = 0}^{n = {x - 1}}{A_{n}{{PP}_{n}.}}}$

In this simple preferred example case, set

x=6 and A_(n)=(1/x)

to produce evenly weighted boxcar averages from data representing sixsequential motor current commutation pulse measurements. And likewise,$I_{R1} \equiv {\sum\limits_{n = x}^{n = {{2x} - 1}}{A_{n}I_{n}}}$and${PP}_{R1} \equiv {\sum\limits_{n = x}^{n = {{2x} - 1}}{A_{n}{PP}_{n}}}$

for range one.

In similar manner, evenly weighted boxcar averages are calculated fromdata in defined alphabetic ranges, as follows.

By setting

y=15 and A_(n)=(1/y)

and applying into equations$I_{Ra} \equiv {\sum\limits_{n = 0}^{n = {y - 1}}{A_{n}I_{n}}}$$I_{Rb} \equiv {\sum\limits_{n = y}^{n = {{2y} - 1}}{A_{n}I_{n}}}$$I_{Rc} \equiv {\sum\limits_{n = {2y}}^{n = {{3y} - 1}}{A_{n}I_{n}}}$$I_{Rd} \equiv {\sum\limits_{n = {3y}}^{n = {{4y} - 1}}{A_{n}I_{n}}}$$I_{Re} \equiv {\sum\limits_{n = {4y}}^{n = {{5y} - 1}}{A_{n}I_{n}}}$$I_{Rf} \equiv {\sum\limits_{n = {5y}}^{n = {{6y} - 1}}{A_{n}I_{n}}}$

and into equations

n=y−1

${PP}_{Ra} \equiv {\sum\limits_{n = 0}{A_{n}{PP}_{n}}}$${PP}_{Rb} \equiv {\sum\limits_{n = y}^{n = {{2y} - 1}}{A_{n}{PP}_{n}}}$${PP}_{Rc} \equiv {\sum\limits_{n = {2y}}^{n = {{3y} - 1}}{A_{n}{PP}_{n}}}$${PP}_{Rd} \equiv {\sum\limits_{n = {3y}}^{n = {{4y} - 1}}{A_{n}{PP}_{n}}}$${PP}_{Re} \equiv {\sum\limits_{n = {4y}}^{n = {{5y} - 1}}{A_{n}{PP}_{n}}}$${PP}_{Rf} \equiv {\sum\limits_{n = {5y}}^{n = {{6y} - 1}}{A_{n}{PP}_{n}}}$

These evenly weighted running software filtered averages are used toreveal calculated trends in larger recent motor operating parameterhistory.

For a system where algorithm processing must be very fast, the use ofrange sizes that are integer powers of the number 2, e.g. 1, 2, 4, 8,16, 32, etc., result in boxcar averaging weighting factors that are veryquickly multiplied by simply and quickly bit or nibble shifting themeasured data.

In addition to running filtered shorter-term and longer-term averages ofrespective numeric range data and alphabetic range data it is necessaryto compute dynamic noise levels of measured parameters to compensateobstacle detection thresholds for system noise. Increased relative noiselevels necessitate increased obstacle detection thresholds to avoidfalse obstacle detection with subsequent stopping and reversal of theactuator. Such noise levels are computed from minimums and maximumsdetermined by the following definitions.

{MinI_(Ra)}≡minimum value of motor current readings in range a

{MinI_(Rb)}≡minimum value of motor current readings in range b

{MinI_(Rc)}≡minimum value of motor current readings in range c

{MinI_(Rd)}≡minimum value of motor current readings in range d

{MinI_(Re)}≡minimum value of motor current readings in range e

{MinI_(Rf)}≡minimum value of motor current readings in range f

{MaxI_(Ra)}≡maximum value of motor current readings in range a

{MaxI_(Rb)}≡maximum value of motor current readings in range b

{MaxI_(Rc)}≡maximum value of motor current readings in range c

{MaxI_(Rd)}≡maximum value of motor current readings in range d

{MaxI_(Re)}≡maximum value of motor current readings in range e

{MaxI_(Rf)}≡maximum value of motor current readings in range f

Maximums and minimums from multiple alphabetic ranges are per theseexamples.

{MinI_(Rb-f)}≡minimum value of motor current readings in ranges b-f

{MaxI_(Rb-f)}≡maximum value of motor current readings in ranges b-f

Obstacle detection is based upon the history of minimum and maximummotor operation parameter measurements. The difference between theminimum and the maximum values gives an indication of the measured noiselevels.

A very generic equation for obstacle detection includes above factors,shown below. Note that the term including the factor I_(R0) isincorporated into the term on the left side and accommodated by suitableadjustment of remaining K_(n) factors.

HARD and/or SOFT OBSTRUCTION DETECTION:

IfI_(R0)≧[K₁I_(Ra)]+[K₂I_(Rb)]+[K₃I_(Rc)]+[K₄I_(Rd)]+[K₅I_(Re)]+[K₆I_(Rf)]+[K₇PP_(Ra)]+[K₈PP_(Rd]+[K)₉PP_(Rc)]+[K₁₀PP_(Rd)]+[K₁₁PP_(Re)]+[K₁₂PP_(Rf)]+[K₁₃I_(R1)]+[K₁₄{MinI_(Ra-f)}]+[K₁₅{MaxI_(Ra-f)}]+[K₁₆PP_(R0)]+[K₁₇PP_(R1)]+K₈

THEN AN OBSTACLE IS DETECTED

All of the above factors based upon I, PP, and calculated values thereofare preferred to be simple evenly weighted running averages and/orsimple maximum and minimum comparisons that process relatively quickly.The large quantity of algebraic and logical operations precludescomplete processing fast enough to quickly detect an obstruction andstop before pinch forces exceed safe limits.

Algorithm processing for hard and soft obstruction detection is dividedinto two separate equations, weighting the various terms depending uponmagnitude of importance and processing time requirements. The followingexamples show generalized and preferred algorithms for hard and softobstruction detection. K_(n) factors are empirically determined to meetsystem dynamic performance mandates.

HARD OBSTRUCTION DETECTION:

IF I_(R0)≧[K₁I_(R1)]+[K₂PP_(R1)]+K₃

THEN AN OBSTACLE IS DETERMINED.

Hard obstruction detection is imperative to determine very quickly sothis implementation keeps processing requirements to a low level, yetenables fast and reasonably precise hard obstacle detection. Large rangeaverage terms including current, pulse period, minimum current, andmaximum current are all considered insignificant enough in the tradeoffagainst speed so they are removed. Small range average motor current,I_(R0), is thus unitlessly compared with the sum of three terms I_(R1),PP_(R1), and K₃. This essentially compares immediate average currentwith immediately prior average current and immediately prior averagepulse period plus an offset constant Thus, a quick increase in sustainedmotor current tends toward hard obstruction determination. High valuesof pulse period indicate that the motor is running slow with hightorque, so the difference between the actuator force and the maximumallowable pinch force is also low. Thus, high values of pulse periodalso tend toward hard obstruction determination.

SOFT OBSTRUCTION DETECTION:

IF I_(R0)≧[K₄PP_(Rb-f)]+[K₅{Min I_(Rb-f)}]+[K₆{Max I_(Rb-f)}]+K₇

THEN AN OBSTACLE IS DETERMINED.

Soft obstruction detection is not nearly as time sensitive, as is hardobstruction detection, thus additional terms can be computed in the timeallowed before the slow increase in entrapment force exceeds maximumallowable values. The large range average term for pulse period ofranges b-f provides a relatively stable representation of pulse periodthat relates inversely with speed. As speed is decreased, pulse periodis increased. High values of PP indicate that the motor is running slowwith high torque, so the difference between the actuator force and themaximum allowable pinch force is also low. Thus, high values of pulseperiod also tend toward hard obstruction determination. The large rangeminimum and maximum terms for motor current in ranges b-f are lumpedtogether into two terms to provide a practical combination of termsrepresenting both average current and current noise range. Dynamicloading conditions produce dynamic currents that result in a wider rangeof maximum, minimum, and maximum minus minimum current values. Highvalues of current noise necessitate higher soft obstruction detectionthreshold values to avoid nuisance detection.

Depending upon the periodicity of motor loading conditions, it ispossible to not only adapt thresholds reactively, but also topredictively adapt thresholds in anticipation of continued cyclicloading conditions. Software algorithms that evaluate various alphabeticrange sizes of the FIFO data set to quantify max and min enabledetermination of alternating amplitudes characteristic of frequencyand/or frequencies for which motor operation parameter loading revealscyclic periodicity. Adaptive predictive compensation of soft obstacledetection enables improved sensitivity for set detection thresholds withreduced affect by cyclic dynamic loads such as wind buffeting orrepetitive gear loading. The obstacle detection threshold is cyclicallymodified in anticipation of the regular disturbance detected. Suchcyclic obstacle detection modification can occur simultaneously withdynamic transient response of obstacle detection threshold levels, asotherwise described.

Alternative Incremental Encoding Implementions

Sensorless electronic sensing of motor current commutation pulses is thepreferred low cost method of motor rotor movement disclosed herein infair detail. In certain circumstances, it may be preferable to usealternative absolute and/or incremental position sensing by at least onehardware sensor means. Such circumstances that might lead to the choiceto implement position sensing via hardware sensors include: 1)desire tosense a greater number of encoder pulses per motor rotor revolution thanproduced by motor commutation segments to enable faster obstacledetection per time and/or per rotation; 2)high electrical noiseenvironment that makes it difficult to maintain high accuracy ofposition count from electronic sensing of encoder pulses; 3)actuatormechanisms that potentially allow mechanical windup and/or jitter thatmechanically feeds back to the motor rotor allowing production of rotorelectronic pulses representing ostensible actuator motion and/or motionin the incorrect sense; and 4)systems for which it is desired tomaintain strict position accuracy regardless of electrical noise andmechanical disturbances.

One particular general alternative preferred embodiment for incrementalpositioning sensing utilizes two sensing elements physically aligned toproduce phase quadrature signals from a relatively moving target. Twosensing elements in phase quadrature orientation provide informationabout both speed and direction. A typical example of this implementationis to attach a diametrically magnetized (two pole) magnet to the rotorof a motor with two symmetrical bipolar latch Hall effect sensors heldin 90 mechanical degrees and in proximity to sense the magnet. By thissetup, there are two transitions per Hall effect sensor per pole pair,thus a total of four transitions per motor rotor revolution by which totrigger measurements of motor operation parameters as herein describedwith motor current commutation pulse sensing. Alternatively, use of aring magnet having 10 pole pairs with similar symmetric bipolar latchHall effect sensors in phase quadrature will produce 40 transitions permotor rotor revolution.

Various sensing properties utilized for incremental and/or absoluteposition sensing including optical, magnetic field, electric field,potentiometric, and the like. Magnetic fields are sensed by Hall effect,magnetoresistance, anisotropic magnetoresistance, giantmagnetoresistance, collosal magnetoresistance, Wiegand effect, fluxgatemagnetometry, magnetodiode, magnetotransistor, superconducting quantuminterference magnetometry, and more. Electric fields are sensed byelectrodes of fixed and/or variable geometry with sensitive electroniccircuitry. Optical fields are sensed by photodiode, phototransistor,photoresistor, and thermocouple (for slowly changing fields converted toheat). Electromagnetic fields are sensed by electrodes as coupledantennas with tuned electronic circuitry.

Battery and Motor Protection

Battery voltage is monitored to determine when the power supply dropsbelow some minimum value so the motor drive can be discontinued. Thisprotects against battery rundown in the situation where a low voltagebattery power supply is insufficient to drive the motor and/or sustainedelectrical load might pose a risk of draining the battery. A timeouttimer to limit motor drive time is an additional preferred means bywhich similar protection is affected. Motor protection is optionallyprovided by such means as a current limiting diode, a positivetemperature coefficient resistor, and/or a thermal cutout switch.

Ice Breaking

An alternative functional capability is an ice-breaking mode wherebyfull motor force is allowed for more than the minimum amount of timeand/or distance to enable a window and/or sunroof panel to break loosefrom ice. This feature will be appreciated by many in cold climates whofind their car windows and/or sunroofs stuck in position due to ice. Forvisibility and/or escape safety, this option is fully anticipated as apreferred functional feature. For this optional mode of operation, thecontroller remembers the starting position for safety reference and willnot allow significant deviation therefrom if hard obstacle detectionconditions are sustained. Under manual switched input control, thecontroller allows for alternating direction application of full motorforce for some predetermined maximum distance and/or time, for examplethree millimeters and/or three seconds alternately in either directionbefore enabling hard obstacle detection capability. The characteristiccurrent peak and then drop usually occurs over approximately 10 motorcurrent commutation pulses, which corresponds to approximately 3 mm. IFstartup current deviates significantly above normal AND IF the number ofmotor current commutation pulses deviates significantly below 10 duringthe usual amount of time for a typical startup characteristic, THEN thestall timeout timer can be increased up to perhaps 5 seconds to breakice by a simple algorithm based upon the two deviations. Thereafter, ifnormal actuator motion does not commence by breaking loose from the ice,the actuator can then be retracted to remove hard obstacle preload andthe ice breaking cycle repeated. 3 mm is typically sufficient to breakice and also corresponds with the startup hard obstacle detectiondistance under conditions of obstacle preload. If the motor currentremains high and the number of pulses is normal at the characteristicstartup time, then a hard obstacle is determined. For safetyconsiderations, this feature might be enabled only when the sensedambient temperature is sufficiently cool to allow for the existence ofice conditions. Soft frozen ice might actually take a longer amount oftime and/or distance to break free than hard frozen ice, therenecessitating adjustment of the maximum set times and/or distances basedon sensed temperature. An alternate method of breaking ice can beenabled with a switch press sequence. For example, two taps and hold,then the unit can go into manual mode which disables obstructiondetection.

Timed Power Latch

An optional feature included in the preferred embodiment is for thecontroller to self latch power for an amount of time after the vehicleignition is switched off, for example 15 seconds, to allow the vehicleoperator to close the sunroof and/or windows. Likewise, another vehiclesecurity alternative is to allow the operator to select the option forthe vehicle sunroof and/or windows to automatically close when theignition is switched OFF. This feature can work in conjunction with analternative feature whereby the vehicle cabin temperature is sensed forthe automatic function of opening the sunroof and/or the windows to theVENT position when the sensed vehicle cabin temperature exceeds somemaximum set temperature. Similarly, a sunroof and/or window canautomatically close to the fully closed position when the sensed vehiclecabin temperature is below some set temperature. A reasonable hysteresisbetween the vent set temperature and the cool close temperature willreduce unnecessary cycling between VENT and CLOSED positions.

Vehicle Communication Systems

Communication motor vehicle computer via the vehicle communication busproblem is optional based upon interface system capability andapplication requirements. Examples of vehicle communication busesinclude SAE (Society of Automotive Engineers) J1850, CAN (ControllerArea Network), and numerous others developed by various automotivemanufacturers. Such communication means can communicate actuator systemfault conditions including faulty motor coil or commutator segment, lowactuation speed, excessive motor current, drive mechanism rangelimitation, component failures, system failures, and the like.

This vehicle speed information might be obtained by vehicle busmultiplexing (MUX) communication and/or demultiplexing (DEMUX)communication from such sources as speedometer, transmission, andtransfer case as is used by other sources such as cruise control system,anti-skid braking system, and traction control system. Similarly,information from the vehicle environmental control systems might provideinformation such as fan speeds and ventilation settings that can be ofvalue to anticipate an amount of static and transient loading on thesunroof and windows. Utilization of a relatively fast respondingpressure sensor enables empirically-correlative predictive modificationof obstacle detection thresholds to overcome variable changes ofactuator load due to static, periodic dynamic, and transient dynamicvehicle cabin atmospheric pressures. An optional anticipated feature isfor the vehicle sunroof position to be automatically moved to a positionto reduce sensed cabin wind buffeting and/or noise.

Empirical Actuation Motor Load Profile Equation and Algorithm

Nominal operation parameters for obstacle detection threshold areempirically characterized as motor current loading versus actuatorposition. Alternative empirical characterizations include motor currentversus time, motor speed versus time, motor speed versus position, andcombinations thereof as per prior art references. In the presentembodiment, this algebraic representation has a general simplifiedalgebraic form for fast computation via DSP processing, particularlyimplementing adding and/or bit shifting and/or byte shifting operations.These types of empirical data manipulations for conversion to fastcomputing real time microcontroller algorithms have been found to beapplicable to various diverse combinations of vehicles and sunroofs.

To accommodate each vehicle's fixed aerodynamic profile, it is typicallynecessary to empirically determine and characterize each type of vehiclewith each type of sunroof for each direction of opening and/or closingover a wide range of vehicle speed and temperature conditions todetermine all appropriate adaptive obstacle detection thresholdcalculation algorithms.

The present invention provides a system wherein empirical datarepresenting a range of operational conditions and empiricallydetermined functional terms and factors for an automatic poweredactuator can be converted by simplified piecewise line and/or curvefitting means to algorithmic equations with coefficients that supportfast real time processing such that adaptive sensing thresholds areenabled resulting in improved sensitivity, improved accuracy, andimproved time response to obstruction conditions. Based upon thecomplexity of the actuation system, sensitivity requirements, and timeresponse requirements, additional refinements as threshold errorreducing terms can be characterized for inclusion into the sensingthreshold equation using similar methods.

Utilization of simplified equations in the processing algorithms allowsfor fast performance in real time without relying upon previous methodssuch as using fixed characteristic signature templates and/or slowingdown actuator motor drive speed.

Alternative Applications

When used to operate a power sunroof the control circuit can open thesunroof, close the sunroof, and tilt open the sunroof to a ventposition. The preferred embodiment of the invention automaticallycontrols a power sunroof but similar actuation of other automaticpowered panels or windows is anticipated using the disclosed controlcircuit and obstruction detection methods.

Load sensing threshold determinations via similar methods to thisteaching are anticipated for alternative application functions includingthose without human involvement and for applications without potentialfor equipment damage. It is fully anticipated and expected that systemsand methods can well be similarly utilized to control practically anysystem variable by monitoring at least one operational parameter suchthat the controlled variable is not required to be safety related. Thismethod and system, based on empirical determinations of operatingparameters, running measurements of operating parameters, FIFO memoriesfor storing measured and/or calculated values, fast computationalgorithms, and subjective determination of load threshold parametervalues can generally be applied to systems and devices where suchvariable thresholds are chosen for functional means other than forpurposes of human safety or equipment protection. The large scopeincludes systems having more than one such controlled variable.

Aeronautical systems have applicability of the inventive disclosure. Anexample is the detection of the onset of stall conditions by the changein force and/or a cyclical varying lift produced by an airfoil as it isincreasingly approaching a stall condition. Such impending stallcondition is the sensed input, instead of obstacle detection, thatprecedes the control response to outputs including engine power, flapactuation, elevator actuation, aileron actuation, rudder actuation, iceboot actuation, and the like. Analogously, hydraulic liquid flow controlsystems for ships and submarines are anticipated.

Hydraulic, pneumatic, and mechanical systems are similarly anticipatedby computations based upon time, position, and/or other derivatives ofmonitored parameters including: position, pressure, volume, flow, force,torque and the like. Utilization of analogous algorithms and adaptivemethods and systems enables obstacle detection, and/or arbitraryfunctional limit detections

Broad Encompassed Alternatives

While the present invention has been described with a degree ofparticularity, it is the full intent that the invention includemodifications and altercations from the disclosed and anticipateddesigns falling within the spirit and/or scope of the appended claims.

What is claimed is:
 1. Apparatus for controlling activation of a motorfor moving an object along a travel path and de-activating the motor ifan obstacle is encountered by the object comprising: a) a movementsensor for monitoring movement of the object as the motor moves saidobject along a travel path; b) a switch means for controllingenergization of the motor with an energization signal; and c) acontroller coupled to the switch means for controllably energizing themotor and having an interface coupling the controller to the movementsensor; said controller comprising: i) means for determining motor speedfrom an output signal from the movement sensor; ii) means forcalculating an obstacle detect threshold based on motor speed ofmovement detected during at least one prior period of motor operation;iii) a comparator for comparing a value based on currently sensed motormovement with the obstacle detect threshold; and iv) output meanscoupled to said switch means for stopping the motor if the comparisonbased on currently sensed motor movement indicates the object hascontacted an obstacle.
 2. The apparatus of claim 1 wherein thecontroller includes a dock and the current signal from the currentsensor is in a form of a sequence of pulses and further wherein thecontroller counts clock signals occurrences between receipt of currentpulses to provide an indication of motor speed.
 3. The apparatus ofclaim 2 wherein the controller extrapolates between pulses in the eventpulses are not generated during certain periods of motor operation. 4.The apparatus of claim 1 wherein the controller includes an interfacefor monitoring user actuation of control inputs for controlling movementof the object and wherein the controller maintains a motor energizationsequence a specified minimum time period in response to a short perioduser actuation of said control inputs to maintain position accuracy inmonitoring object movement.
 5. The apparatus of claim 1 wherein thecontroller includes an interface for monitoring user actuation ofcontrol inputs for controlling movement of the object and wherein inresponse to a specified input the controller conducts a calibrationmotor energization sequence to determine parameters of object.
 6. Theapparatus of claim 1 wherein the controller includes an interface formonitoring user actuation of control inputs for controlling movement ofthe object and wherein and wherein the controller maintains a positionindication which is updated in response movement of the window or paneland further wherein the controller stops motor actuation prior toreaching specified end points in an object path of travel to avoidmechanical windup of the motor and a transmission coupled to the object.7. Apparatus for controlling activation of a motor for moving a windowor panel along a travel path and de-activating the motor if an obstacleis encountered by the window or panel comprising: a) a current sensorfor sensing the motor current as the motor moves the window or panelalong a travel path; b) a switch means for controlling energization ofthe motor with an energization signal; and c) a controller coupled tothe switch means for controllably energizing the motor and having aninterface coupling the controller to both the current sensor; saidcontroller comprising: i) means for monitoring motor current from thecurrent sensor; ii) means for calculating an obstacle detect thresholdbased on motor current detected during at least one prior period ofmotor operation; iii) a comparator for comparing a value based oncurrently sensed motor current with the obstacle detect threshold; andiv) output means coupled to said switch means for stopping the motor ifthe comparison based on currently sensed motor current indicates thewindow or panel has contacted an obstacle.
 8. The apparatus of claim 7wherein the controller includes a buffer memory for storing successivevalues of motor current for use in determining the obstacle detectthreshold.
 9. The apparatus of claim 8 wherein the buffer memory is usedto store a value derived from motor current corresponding to motor speedas the window or panel moves along its travel path.
 10. The apparatus ofclaim 8 wherein the current sensor provides an analog current signal andthe controller comprises means for converting the analog signal to adigital current value and stores successive values of the digitalcurrent value within the buffer memory.
 11. The apparatus of claim 10wherein the controller adapts a resolution of the digital current signalbased upon a real time sensed current value.
 12. The apparatus of claim8 wherein the current sensor comprises a filter circuit for filteringout DC components from a motor current signal to produce a signalrelated to motor speed.
 13. The apparatus of claim 8 wherein thecontroller includes means for adjusting the obstacle threshold based ondynamic motor current as sensed from the current sensor to take intoaccount varying loads experienced by the motor.
 14. The apparatus ofclaim 13 wherein the changes in load are periodic and the threshold issynchronized with the periodic load changes.
 15. The apparatus of claim14 wherein the experienced changes in load are transient and wherein thecontroller adjusts the threshold based on said transient change in load.